fun main() {
    //调用nowTime会自动调用get方法块
    println(StringUtils.nowTime)
}

inline fun <reified T : Number> setArray(array: Array<T>) {
    array.forEach {
        println(it.toString())
    }
}

fun <T> getMax(array: Array<T>, greater: (T, T) -> Boolean): T? {
    var max: T? = null
    for (item in array) {
        if (max == null) {
            max = item
        } else if (greater(item, max)) {
            max = item
        }
    }

    return max
}


fun getData(vararg args: Int): Int {
    var res = 0
    for (i in args) {
        res += i
    }
    return res
}

fun getData(i: Int = 1, j: Int = 2, m: Int = 3): Int {
    return i + +j + m
}

fun getData(i: Int): Int = i + 2 + 3 + 4


